<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/hdocs/style/css/center.css" type="text/css" rel="stylesheet" />
<link href="/hdocs/style/css/common.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/hdocs/jquery/js/jquery-1.8.2.js"></script>
<title>瓜朋网-消息中心对话界面</title>
</head>
<body>
      #set ($menuIndex="darren") #parse("/inc/header.html")
      <p class="h10"></p>
      <p class="h10"></p>
      <p class="h10"></p>
      <p class="h10"></p>
      <div class="centent">
            <div class="messLe">
                 <p class="messTcT">消息中心</p>
                 <a href="/message/write.html">写信</a>
                 <a href="/message/lettersInbox.jsp" class="def">站内信</a>
                 <a href="/message/notifys.jsp">通知</a>
            </div>
            <div class="cenRi">
                <p class="cenTab">
                    #if($!letterType==1)
                    <a href="/message/lettersInbox.jsp" class="mesa">收件箱</a>
                    <a href="/message/lettersOutbox.jsp" class="mescv">发件箱</a>
                    #else
                    <a href="/message/lettersInbox.jsp" class="mesav">收件箱</a>
                    <a href="/message/lettersOutbox.jsp" class="mesc">发件箱</a>
                    #end
                </p>
                <p class="h10"></p>
                <div class="afgFy">
                	<p class="scGk"><a href="#">共$!count条私信</a></p>
                </div>
                <p class="h10"></p>
                <textarea id="message" class="mesEar"></textarea>
                <p class="h10"></p>
                <p class="BtnSm"><a href="javascript:sendMessage($!yourId);">发送</a></p>
                <p class="h10"></p>
                <p class="h10"></p>
                <p class="h10"></p>
                #foreach( $letter in $letters)
                	 #if($letter.sendid==$sessionLoginuser.accountid)
                	 <div class="msRtax msRi">
	                      <div class="msRle msLe">
	                            <em class="msDit"><img src="/hdocs/style/img/msDit.gif"/></em>
	                            <p class="msXup"><img src="/hdocs/style/img/msUp.gif"/></p>
	                            <div class="msZxm">
	                                  <div class="msSaya">
	                                        <p class="msSayb"><a href="#">我：</a></p>
	                                        <p class="msSayc">$letter.message</p>
	                                  </div>
	                                  <p class="msBack"><a href="#">回复</a><span>$letter.createdate</span></p>
	                            </div>
	                            <p class="msXdm"><img src="/hdocs/style/img/msDm.gif"/></p>
	                      </div>
	                      <em class="msRri msRi"><img src="/hdocs/style/img/mesPsa.jpg"/></em>
	                 </div>
                	 #elseif($letter.sendid!=$sessionLoginuser.accountid)
                	 <div class="msRtax msLe">
	                      <em class="msRri msLe"><img src="/hdocs/style/img/mesPsa.jpg"/></em>
	                      <div class="msRle msRi">
	                            <em class="msDitx"><img src="/hdocs/style/img/msDitx.gif"/></em>
	                            <p class="msXup"><img src="/hdocs/style/img/msUp.gif"/></p>
	                            <div class="msZxm">
	                                  <div class="msSaya">
	                                        <p class="msSayb"><em></em><a href="#">他：</a></p>
	                                        <p class="msSayc">$letter.message</p>
	                                  </div>
	                                  <p class="msBack"><a href="#">回复</a><span>$letter.createdate</span></p>
	                            </div>
	                            <p class="msXdm"><img src="/hdocs/style/img/msDm.gif"/></p>
	                      </div>
	                 </div>
                	 #end
                <p class="h10"></p>
                <p class="h10"></p>
                <p class="h10"></p>
                #end
                <p class="h10"></p>
                <p class="h10"></p>
                <p class="h10"></p>
                #set($requestURL="/message/letterInfo.jsp?receiveid=$!receiveid&sendid=$!sendid")
                #parse("/inc/pageControl.html")
                <p class="h10"></p>
                <p class="h10"></p>
                <p class="h10"></p>
            </div>
      </div>
      #parse("/inc/footer.html")
</body>
</html>
<script type="text/javascript">
function sendMessage(receiveid) {
	var message = $("#message").val();
	$.getJSON("/message/reply.json",{receiveid:receiveid,message:message}, function(result) {
		alert(result.message);
		if(result.flag==1){
			window.top.location.reload();
		}
	});
}
</script>

